package com.ai.fortune_matrix.controller;

import com.ai.fortune_matrix.service.impl.CustomerSupportAssistant;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Flux;

/**
 * @Author: zjg
 * @Date: 2025/5/16 15:24
 * @Description:
 **/
@RequestMapping("/api/assistant")
@RestController
public class LotteryController {
    private final CustomerSupportAssistant agent;

    public LotteryController(CustomerSupportAssistant agent) {
        this.agent = agent;
    }

    @RequestMapping(path="/chat", produces = "text/stream;charset=UTF-8")
    public Flux<String> chat(String chatId, String userMessage) {

        return agent.chat(chatId, userMessage);
    }
}
